-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a conversion mechanism between NLPModel to OptimizationProblem #792
Conversation
@Vaibhavdixit02 I'm working on the tests and I ran into an issue. Since |
Can you show the code you ran and the error? |
I was manually running through the tests
And the full error is
The actual error is not that informative, the line where it breaks is
|
Okay so the issue is because IPNewton from Optim expects You can add a Alternatively just use a different optimizer here, Ipopt should be able to work with the lagrangian directly. |
@alonsoC1s please pull the branch before pushing the next commit since I made some changes above |
@Vaibhavdixit02 I tried using |
Yeah sorry about that, this should work now |
Co-authored-by: Vaibhav Kumar Dixit <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's missing the new packages in the docs environment can you add that, and also run the formatter. We should be done then!
@alonsoC1s the documentation is failing and looks like a real failure can you take a look? |
I think this should fix it |
Great work!!! cc @tmigot |
That's cool! Thanks @alonsoC1s @Vaibhavdixit02 |
@amontoison yeah I'll update the readme it's a bit outdated now @tmigot sure it shouldn't be a lot of work to do it the other way around too. Just to clarify our main motivation for this PR was to access Cutest benchmarks with Optimization.jl |
@tmigot That sounds interesting and useful. I think Optimization.jl wraps more optimizers, so having the mechanism to switch between could be nice |
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Would close #790 by adding a new constructor
OptimizationProblem(model::AbstractNLPModel, ...)
that makes the problem defined as anNLPModel
available as anOptimizationProblem
and thus, makes it available to the rest of the SciML ecosystemSo far the appropriate tests are still missing and the public API documentation hasn't been updated